import { HttpModule, Module } from '@nestjs/common';
import { TokenService } from './token.service';
import { TokenController } from './token.controller';
import { ConfigModule } from '@nestjs/config';
import { WeChatMiniProgramsConfig } from 'src/config/we-chat-mini-program.config';
import { JwtModule } from '@nestjs/jwt';
import { PassportModule } from '@nestjs/passport';
import { jwtModuleOptions } from 'src/config/jwt.config';
import { UsersModule } from '../users/users.module';
import { JwtStrategy } from './jwt.strategy';

@Module({
  imports: [
    ConfigModule.forFeature(WeChatMiniProgramsConfig),
    PassportModule,
    JwtModule.register(jwtModuleOptions),
    HttpModule,
    UsersModule,
  ],
  providers: [TokenService, JwtStrategy],
  controllers: [TokenController],
})
export class TokenModule {}
